<%
  icon = "avo/selector"

  if params[:sort_by] == field.id.to_s
    case params[:sort_direction]
      when 'asc'
        icon = "avo/sort-ascending"
      when 'desc'
        icon = "avo/sort-descending"
      end
  end
%>
<%= svg icon,
  class: 'inline-block fill-current text-gray-500 relative leading-none min-w-[1rem] min-h-full ml-1 h-4',
  data: {
    tippy: :tooltip,
    tippy_content: sort_tippy_content
  }
%>
